home *** CD-ROM | disk | FTP | other *** search
- /*
- TakeScreenShot
- By Brigham Stevens, May 1992
- Apple Computer Developer Technical Support
-
- See the readme file for explanation
- */
-
- typedef pascal void (*fkeyJSR)();
-
- void TakeScreenShot()
- {
- Handle fkeycode;
- fkeyJSR callAddr;
-
- /* check if FKEY is loaded */
- fkeycode = GetResource('FKEY',3);
- if(!fkeycode) {
- DebugStr("\p••• ERROR: The ScreenShot FKEY did not load.; G");
- goto bail;
- }
-
- /* lock and strip it before we jump on it */
- HLock(fkeycode);
- callAddr = StripAddress(*fkeycode);
-
- /* JSR to the FKEY */
- (*callAddr)();
-
- bail:
- /* get rid of the FKEY and clean the stack */
- ReleaseResource(fkeycode);
- DebugStr("\p ;s;s; PC = savePC");
- /* this will leave you sitting in the debugger */
- }